﻿<!DOCTYPE html>
<html lang="en">
<head>
    <title>My Account</title>
    <meta charset="utf-8"/>

    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <!-- GOOGLE WEB FONTS -->
    <link rel="stylesheet" href="/css/font-awesome.min.css">

    <!-- BOOTSTRAP 3.3.7 CSS -->
    <link rel="stylesheet" href="/css/bootstrap.min.css"/>

    <!-- SLICK v1.6.0 CSS -->
    <link rel="stylesheet" href="/css/slick-1.6.0/slick.css"/>

    <link rel="stylesheet" href="/css/jquery.fancybox.css"/>
    <link rel="stylesheet" href="/css/yith-woocommerce-compare/colorbox.css"/>
    <link rel="stylesheet" href="/css/owl-carousel/owl.carousel.min.css"/>
    <link rel="stylesheet" href="/css/owl-carousel/owl.theme.default.min.css"/>
    <link rel="stylesheet" href="/css/js_composer/js_composer.min.css"/>
    <link rel="stylesheet" href="/css/woocommerce/woocommerce.css"/>
    <link rel="stylesheet" href="/css/yith-woocommerce-wishlist/style.css"/>


    <link rel="stylesheet" href="/css/custom.css"/>
    <link rel="stylesheet" href="/css/app-orange.css" id="theme_color"/>
    <link rel="stylesheet" href="" id="rtl"/>
    <link rel="stylesheet" href="/css/app-responsive.css"/>
</head>

<body class="page woocommerce-account woocommerce-page">


<div class="body-wrapper theme-clearfix">
    <header id="header" class="header header-style1">
        <div class="header-top clearfix">
            <div class="container">
                <div class="rows">
                    <!-- SIDEBAR TOP MENU -->
                    <div class="pull-left top1">
                        <div class="widget text-2 widget_text pull-left">
                            <div class="widget-inner">
                                <div class="textwidget">
                                    <div class="call-us"><span>联系我们: </span>023-8888-8888</div>
                                </div>
                            </div>
                        </div>

                    </div>

                    <div class="wrap-myacc pull-right">
                        <div class="sidebar-account pull-left">
                            <div class="account-title">My account</div>

                            <div id="my-account" class="my-account">
                                <div class="widget-1 widget-first widget nav_menu-4 widget_nav_menu">
                                    <div class="widget-inner">
                                        <ul id="menu-my-account" class="menu">
                                            <li class="menu-my-account">
                                                <a class="item-link" href="my_account.html">
                                                    <span class="menu-title">My Account</span>
                                                </a>
                                            </li>

                                            <li class="menu-cart">
                                                <a class="item-link" href="cart.html">
                                                    <span class="menu-title">Cart</span>
                                                </a>
                                            </li>

                                            <li class="menu-checkout">
                                                <a class="item-link" href="checkout.html">
                                                    <span class="menu-title">Checkout</span>
                                                </a>
                                            </li>

                                            <li class="menu-wishlist">
                                                <a class="item-link" href="#">
                                                    <span class="menu-title">Wishlist</span>
                                                </a>
                                            </li>
                                        </ul>
                                    </div>
                                </div>

                                <div class="widget-2 widget-last widget sw_top-4 sw_top">
                                    <div class="widget-inner">
                                        <div class="top-login">
                                            <div class="div-logined">
                                                <ul>
                                                    <li>
                                                        <a href="javascript:void(0);" data-toggle="modal"
                                                           data-target="#login_form">
                                                            <span>Login</span>
                                                        </a>
                                                        <span class="wg">Welcome Guest</span>
                                                    </li>
                                                </ul>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div class="pull-left top2">
                            <div class="widget-1 widget-first widget nav_menu-2 widget_nav_menu">
                                <div class="widget-inner">
                                    <ul id="menu-checkout" class="menu">
                                        <li class="menu-checkout">
                                            <a class="item-link" href="checkout.html">
                                                <span class="menu-title">Checkout</span>
                                            </a>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>


        <div class="header-bottom clearfix">
            <div class="container">
                <div class="rows">
                    <!-- Primary navbar -->
                    <div id="main-menu" class="main-menu">
                        <nav id="primary-menu" class="primary-menu">
                            <div class="navbar-inner navbar-inverse">
                                <div class="resmenu-container">
                                    <button class="navbar-toggle" type="button" data-toggle="collapse"
                                            data-target="#ResMenuprimary_menu">
                                        <span class="sr-only">Categories</span>
                                        <span class="icon-bar"></span>
                                        <span class="icon-bar"></span>
                                        <span class="icon-bar"></span>
                                    </button>

                                    <div id="ResMenuprimary_menu" class="collapse menu-responsive-wrapper">
                                        <ul id="menu-primary-menu" class="etrostore_resmenu">
                                            <li><a href="/homePage">首&nbsp;&nbsp;页</a></li>
                                            <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
                                            <li><a href="/user/cartPage">购物车</a></li>
                                            <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
                                            <li><a href="/loginPage">登录/注册</a></li>
                                            <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
                                            <li><a href="/user/myAccountPage">个人中心</a></li>
                                            <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
                                            <li><a href="/aboutUsPage">关于我们</a></li>
                                        </ul>
                                    </div>
                                </div>

                                <ul id="menu-primary-menu-1"
                                    class="nav nav-pills nav-mega etrostore-mega etrostore-menures">
                                    <li><a href="/homePage">首&nbsp;&nbsp;页</a></li>
                                    <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
                                    <li><a href="/user/cartPage">购物车</a></li>
                                    <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
                                    <li><a href="/loginPage">登录/注册</a></li>
                                    <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
                                    <li><a href="/user/myAccountPage">个人中心</a></li>
                                    <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
                                    <li><a href="/aboutUsPage">关于我们</a></li>
                                </ul>
                            </div>
                        </nav>
                    </div>
                    <!-- /Primary navbar -->

                    <div class="top-form top-form-minicart etrostore-minicart pull-right">
                        <div class="top-minicart-icon pull-right">
                            <i class="fa fa-shopping-cart"></i>
                            <a class="cart-contents" href="cart.html" title="View your shopping cart">
                                <span class="minicart-number">2</span>
                            </a>
                        </div>

                        <div class="wrapp-minicart">
                            <div class="minicart-padding">
                                <div class="number-item">
                                    There are <span>items</span> in your cart
                                </div>

                                <ul class="minicart-content">
                                    <li>
                                        <a href="simple_product.html" class="product-image">
                                            <img width="100" height="100" src="/static/images/1903/45-150x150.jpg"
                                                 class="attachment-100x100 size-100x100 wp-post-image" alt=""
                                                 srcset="/static/images/1903/45-150x150.jpg 150w, /static/images/1903/45-300x300.jpg 300w, /static/images/1903/45-180x180.jpg 180w, /static/images/1903/45.jpg 600w"
                                                 sizes="(max-width: 100px) 100vw, 100px"/>
                                        </a>

                                        <div class="detail-item">
                                            <div class="product-details">
                                                <h4>
                                                    <a class="title-item" href="simple_product.html">Veniam Dolore</a>
                                                </h4>

                                                <div class="product-price">
														<span class="price">														
															<span class="woocommerce-Price-amount amount">
																<span class="woocommerce-Price-currencySymbol">$</span>190.00
															</span>
														</span>

                                                    <div class="qty">
                                                        <span class="qty-number">1</span>
                                                    </div>
                                                </div>

                                                <div class="product-action clearfix">
                                                    <a href="#" class="btn-remove" title="Remove this item">
                                                        <span class="fa fa-trash-o"></span>
                                                    </a>

                                                    <a class="btn-edit" href="cart.html"
                                                       title="View your shopping cart">
                                                        <span class="fa fa-pencil"></span>
                                                    </a>
                                                </div>
                                            </div>
                                        </div>
                                    </li>

                                    <li>
                                        <a href="simple_product.html" class="product-image">
                                            <img width="100" height="100" src="/static/images/1903/22-150x150.jpg"
                                                 class="attachment-100x100 size-100x100 wp-post-image" alt=""
                                                 srcset="/static/images/1903/22-150x150.jpg 150w, /static/images/1903/22-300x300.jpg 300w, /static/images/1903/22-180x180.jpg 180w, /static/images/1903/22.jpg 600w"
                                                 sizes="(max-width: 100px) 100vw, 100px"/>
                                        </a>

                                        <div class="detail-item">
                                            <div class="product-details">
                                                <h4>
                                                    <a class="title-item" href="simple_product.html">Cleaner with
                                                        bag</a>
                                                </h4>

                                                <div class="product-price">
														<span class="price">
															<span class="woocommerce-Price-amount amount">
																<span class="woocommerce-Price-currencySymbol">$</span>350.00
															</span>
														</span>

                                                    <div class="qty">
                                                        <span class="qty-number">1</span>
                                                    </div>
                                                </div>

                                                <div class="product-action clearfix">
                                                    <a href="#" class="btn-remove" title="Remove this item">
                                                        <span class="fa fa-trash-o"></span>
                                                    </a>

                                                    <a class="btn-edit" href="cart.html"
                                                       title="View your shopping cart">
                                                        <span class="fa fa-pencil"></span>
                                                    </a>
                                                </div>
                                            </div>
                                        </div>
                                    </li>
                                </ul>

                                <div class="cart-checkout">
                                    <div class="price-total">
                                        <span class="label-price-total">Total</span>

                                        <span class="price-total-w">
												<span class="price">
													<span class="woocommerce-Price-amount amount">
														<span class="woocommerce-Price-currencySymbol">$</span>540.00
													</span>
												</span>
											</span>
                                    </div>

                                    <div class="cart-links clearfix">
                                        <div class="cart-link">
                                            <a href="cart.html" title="Cart">View Cart</a>
                                        </div>

                                        <div class="checkout-link">
                                            <a href="checkout.html" title="Check Out">Check Out</a>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="mid-header pull-right">
                        <div class="widget sw_top">
								<span class="stick-sr">
									<i class="fa fa-search" aria-hidden="true"></i>
								</span>

                            <div class="top-form top-search">
                                <div class="topsearch-entry">
                                    <form role="search" method="get" class="form-search searchform" action="">
                                        <label class="hide"></label>
                                        <input type="text" value="" name="s" class="search-query"
                                               placeholder="Keyword here..."/>
                                        <button type="submit" class="button-search-pro form-button">Search</button>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </header>

    <div class="listings-title">
        <div class="container">
            <div class="wrap-title">
                <h1>个人中心</h1>
                <div class="bread">
                    <div class="breadcrumbs theme-clearfix">
                        <div class="container">
                            <ul class="breadcrumb">
                                <li>
                                    <a href="/homePage">首页</a>
                                    <span class="go-page"></span>
                                </li>

                                <li class="active">
                                    <span>个人中心</span>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="container" id="my_account_div" >
        <div class="row">
            <div id="contents" role="main" class="main-page  col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <div class="post-6 page type-page status-publish hentry">
                    <div class="entry">
                        <div class="entry-content">
                            <header>
                                <h2 class="entry-title"></h2>
                            </header>

                            <div class="entry-content">
                                <div class="woocommerce">
                                    <nav class="woocommerce-MyAccount-navigation">
                                        <ul>
                                            <li class="is-active">
                                                <a>个人信息</a>
                                            </li>

                                            <li>
                                                <a href="/user/orderPage ">订单</a>
                                            </li>

                                            <li>
                                                <a href="/user/addressPage ">地址管理</a>
                                            </li>

                                            <li>
                                                <a href="/user/afterSalePage ">售后</a>
                                            </li>

                                            <li>
                                                <a href="/agreementPage ">用户协议</a>
                                            </li>

                                            <li>
                                                <a href="/homePage" onclick="loginOut()">登出</a>

                                            </li>

                                        </ul>
                                    </nav>

                                    <div id="my_account" >
                                        <form id="info_submit">

                                            <div class="list_title">

                                                <table>

<!--                                                    <tr>-->
<!--                                                        <td class="td_class"><img id="show_head_portrait"-->
<!--                                                                                  src="<%=photoUrl%>"></td>-->

<!--                                                        <td>-->
<!--                                                            <div class="list_content"></div>-->
<!--                                                        </td>-->
<!--                                                    </tr>-->

                                                </table>

                                            </div>

                                            <table data-role="listview" data-dividertheme="d" class="list_all">
                                                <tr>
                                                    <td>
                                                        <span class="list_name">用户名:</span>
                                                    </td>

                                                    <td>
                                                        <span type="text" class="list_content" id="show_username"></span>
                                                    </td>

                                                    <td>
                                                        <a type="button"   href="/loginPage">重置密码</a>
                                                    </td>
                                                </tr>

                                                <tr>
                                                    <td>
                                                        <span class="list_name">生&nbsp;&nbsp;&nbsp;日:</span>
                                                    </td>
                                                    <td>
                                                        <input type="text" class="list_content" id="show_birth"
                                                               readonly="readonly">
                                                    </td>
                                                </tr>

                                                <tr>
                                                    <td>
                                                        <span class="list_name">性&nbsp;&nbsp;&nbsp;别:</span>
                                                    </td>
                                                    <td>

                                                        <select class="list_content" id="show_gender">
                                                            <option id="gender_s" value="0">保密</option>
                                                            <option id="gender_m" value="1">男</option>
                                                            <option id="gender_w" value="2">女</option>

                                                        </select>


                                                    </td>
                                                </tr>

                                                <tr>
                                                    <td>
                                                        <span class="list_name">手&nbsp;&nbsp;&nbsp;机:</span>
                                                    </td>
                                                    <td>
                                                        <span type="text" class="list_content" id="show_phone"> </span>
                                                    </td>
                                                </tr>

                                                <!--                                            <tr>-->
                                                <!--                                                <td>-->
                                                <!--                                                    <span class="list_name">邮&nbsp;&nbsp;&nbsp;箱:</span>-->
                                                <!--                                                </td>-->
                                                <!--                                                <td>-->
                                                <!--                                                    <input type="text" class="list_content" id="show_email">-->
                                                <!--                                                </td>-->
                                                <!--                                            </tr>-->


                                            </table>


                                            <input type="submit" class="list_btn" value="保存修改">
                                            <a id="msg"></a>


                                        </form>
                                    </div>



                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

<!--    <div id="reset_password_div">-->
<!--        <form class="checkout_coupon" method="post" action="/resetPassword" id="reset_pass_submit" >-->

<!--            <h3>找回密码</h3>-->
<!--            <div class="clear"></div>-->

<!--            <div  id="msg3" ></div>-->

<!--            <div class="form-row form-row-first validate-required validate-email" >-->
<!--                <label for="reset_pass_phone" class="">-->
<!--                    手机号-->
<!--                </label>-->
<!--                <input type="tel" class="input-text " name="phone" id="reset_pass_phone" placeholder="" autocomplete="phone" value=""/>-->
<!--            </div>-->




<!--            <div >-->
<!--                <div class="form-row form-row-last" >-->
<!--                    <input type="button" id="reset_pass_send_code" onclick="resetSubmitCode()" class="button" name="reset_pass_send_code" value="发送验证码" />-->
<!--                </div>-->
<!--            </div>-->


<!--            <div class="clear"></div>-->

<!--            &lt;!&ndash;验证码&ndash;&gt;-->
<!--            <div class="form-row form-row-first">-->

<!--                <input type="text" name="verifyCode" class="input-text" placeholder="请输入验证码" id="reset_pass_code"  />-->
<!--            </div>-->

<!--            <div id="msg4" ></div>-->

<!--            <p class="form-row form-row-wide" >-->
<!--                <label for="new_pass" class="">-->
<!--                    设置新密码-->
<!--                    <abbr class="required" title="required">*</abbr>-->
<!--                </label>-->
<!--                <input type="password" class="input-text " name="password" id="new_pass" placeholder="" autocomplete="organization" />-->
<!--            </p>-->

<!--            <div>-->

<!--                <p class="form-row">-->
<!--                    <input type="submit" class="button" name="register" value="确认修改" />-->
<!--                </p>-->
<!--            </div>-->

<!--            <div class="clear"></div>-->

<!--        </form>-->
<!--    </div>-->

</div>


<script type="text/javascript" src="js/jquery/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery-migrate.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/jquery/js.cookie.min.js"></script>

<!-- OPEN LIBS JS -->
<script type="text/javascript" src="/static/js/owl-carousel/owl.carousel.min.js"></script>
<script type="text/javascript" src="/static/js/slick-1.6.0/slick.min.js"></script>

<script type="text/javascript" src="/static/js/yith-woocommerce-compare/jquery.colorbox-min.js"></script>
<script type="text/javascript" src="/static/js/sw_core/isotope.js"></script>
<script type="text/javascript" src="/static/js/sw_core/jquery.fancybox.pack.js"></script>
<script type="text/javascript" src="/static/js/sw_woocommerce/category-ajax.js"></script>
<script type="text/javascript" src="/static/js/sw_woocommerce/jquery.countdown.min.js"></script>
<script type="text/javascript" src="/static/js/js_composer/js_composer_front.min.js"></script>

<script type="text/javascript" src="/static/js/plugins.js"></script>
<script type="text/javascript" src="/static/js/megamenu.min.js"></script>
<script type="text/javascript" src="/static/js/main.min.js"></script>

<script type="text/javascript">
    var sticky_navigation_offset_top = $("#header .header-bottom").offset().top;
    var sticky_navigation = function () {
        var scroll_top = $(window).scrollTop();
        if (scroll_top > sticky_navigation_offset_top) {
            $("#header .header-bottom").addClass("sticky-menu");
            $("#header .header-bottom").css({"top": 0, "left": 0, "right": 0});
        } else {
            $("#header .header-bottom").removeClass("sticky-menu");
        }
    };
    sticky_navigation();
    $(window).scroll(function () {
        sticky_navigation();
    });

    $(document).ready(function () {
        $(".show-dropdown").each(function () {
            $(this).on("click", function () {
                $(this).toggleClass("show");
                var $element = $(this).parent().find("> ul");
                $element.toggle(300);
            });
        });
    });
</script>

<!--[if gte IE 9]><!-->
<script type="text/javascript">
    var request, b = document.body, c = 'className', cs = 'customize-support',
        rcs = new RegExp('(^|\\s+)(no-)?' + cs + '(\\s+|$)');
    request = true;

    b[c] = b[c].replace(rcs, ' ');
    // The customizer requires postMessage and CORS (if the site is cross domain)
    b[c] += (window.postMessage && request ? ' ' : ' no-') + cs;
</script>
<!--<![endif]-->

<!--	登出-->
<script>
    function loginOut() {
        var username = $("#uname").val();

        $.ajax({
            url: "/user/loginOut",
            data: {"username": username},
            type: "post",
            success: function (data) {

                // alert(data.msg)
                $("#msg").text(data.msg);

            }
        })
        return false;
    }
</script>

<!--	展示个人信息-->
<script>
    $(document).ready(function () {

        $.ajax({
            url: "/user/getInfo",
            type: "get",
            success: function (d) {

                $("#show_username").text(d.data.username);
                $("#show_birth").val(fmtDate(d.data.birthday));

                if (d.data.gender === 0) {
                    $("#gender_s").attr("selected", "selected");
                }
                if (d.data.gender === 1) {
                    $("#gender_m").attr("selected", "selected");
                }
                if (d.data.gender === 2) {
                    $("#gender_w").attr("selected", "selected");
                }


                $("#show_phone").text(d.data.phone);
                $("#show_email").val(d.data.email);

            }
        })
    })

    //把时间戳转化成yy-MM-dd
    function fmtDate(obj) {
        var date = new Date(obj);
        var y = 1900 + date.getYear();
        var m = "0" + (date.getMonth() + 1);
        var d = "0" + date.getDate();
        return y + "-" + m.substring(m.length - 2, m.length) + "-" + d.substring(d.length - 2, d.length);
    }

    function postJson(obj) {
        var json = JSON.stringify(obj);
        $.ajax({
            url: "user/updateInfo",
            type: "post",
            success: function (d) {

                $("#msg1").text(data.msg);

            }
        })
    }


</script>

<!--日期选择插件-->
<script src="js/laydate/laydate.js"></script>
<script>
    laydate.render({
        elem: "#show_birth" //指定元素
    });
</script>


<script>
    //更新个人信息
    $("#info_submit").submit(function () {

        var data =  {"birthday" : $("#show_birth").val(),"gender" : $("#show_gender").val() }

        $.ajax({
            type: "post",
            url: "/user/updateInfo",
            contentType : 'application/json',
            dataType : 'json',
            data :JSON.stringify(data),

        success: function (data) {

            alert("msg:" + data.msg);

        }
    })
    return false;
    })


    // //控制div显示或隐藏
    // $(document).ready(function() {
    //     $("#my_account_div").show();
    //     $("#reset_password_div").hide();
    //     $("#reset_password").click(function () {
    //         $("#reset_password_div").show();
    //         $("#my_account_div").hide();
    //     });
    //     $("#back").click(function (){
    //         $("#reset_password_div").hide();
    //         $("#my_account_div").show();
    //     });
    //
    // })


    //     //重置密码
    //     $("#reset_pass_submit").submit(function(){
    //     var password = $("#new_pass").val();
    //     var verifyCode =  $("#reset_pass_code").val();
    //     $.ajax({
    //     url: "resetPassword",
    //     data: {"password": password, "verifyCode": verifyCode},
    //     type: "post",
    //     success: function(data){
    //
    //     $("#msg4").text(data.msg);
    //
    // }
    // })
    //     return false;
    // })
    //
    // function resetSubmitCode(){
    //     var isPhone = true;
    //     var phone = $("#reset_pass_phone").val();
    //     $.ajax({
    //         url:"/user/sendCode",
    //         data: {"isPhone":true,"phone":phone},
    //         type: "post",
    //         success: function (data){
    //
    //             $("#msg3").text(data.msg)
    //
    //         }
    //     })
    // }


</script>

</body>
</html>

